package com.l;


public class Main {

	/**
	 * @param args
	 * @throws Exception
	 */
	public static void main(String[] args) throws Exception {

		if (args.length == 0){
			System.out.println("Uso:");
			System.out.println("java -jar l.jar <programa1.l> [programa2.l ... [programaN.l]");
		}
		
		Program program;
		for (int i = 0; i < args.length; i++) {
			program = new Program(args[i]);
			program.run();
		}

//		Pattern pattern = Pattern.compile("\\s*(\\[[a-zA-Z]+\\])?\\s*(([xzXZ][0-9]*)|([yY])+)\\s*=\\s*(([a-zA-Z_][a-zA-Z0-9_]*))\\([xzXZ][0-9]*(,[xzXZ][0-9]*)*\\)\\s*");
//		Matcher matcher = pattern.matcher("[lsls] x1 = f(x2,x3)");
//		String label = null;
//		if (matcher.find()) {
//			label = matcher.group(3);
//		}
//		System.out.println(label);
	}

}
